<ion-header [translucent]="true">
	<ion-toolbar>
		<ion-buttons slot="start">
			<ion-back-button text="返回" defaultHref="/"></ion-back-button>
		</ion-buttons>
		<ion-title>{{ file.name }}</ion-title>
		<ion-buttons *ngIf="showEditor" slot="end">
			<ion-button *ngIf="text?.offset>0" (click)="prev()">
				<ion-icon slot="start" name="arrow-back-circle"></ion-icon>
				<ion-label>上页</ion-label>
			</ion-button>
			<ion-button *ngIf="text?.next" (click)="next()">
				<ion-icon slot="start" name="arrow-forward-circle"></ion-icon>
				<ion-label>下页</ion-label>
			</ion-button>
			<ion-button color="primary" (click)="settings()">
				<ion-icon slot="start" name="settings"></ion-icon>
				<ion-label>设置</ion-label>
			</ion-button>
		</ion-buttons>
	</ion-toolbar>
</ion-header>

<ngx-monaco-editor *ngIf="showEditor" [options]="setting" [ngModel]="text?.context"></ngx-monaco-editor>

<embed *ngIf="showEmbed" [src]="url"/>
